Repository navigation
Conversation
… about Two cells printed a pandas warning into their output: - inflation_history: pd.concat of the sheets, which all have a DatetimeIndex, sorts the joined index by default, which pandas 3 deprecates (Pandas4Warning: "Sorting by default when concatenating all DatetimeIndex is deprecated"). `sort=True` keeps today's sorted result. - fitting_distributions: `times` is in UTC, and converting it to monthly periods drops the time zone, with a UserWarning. Dropping it first with `tz_localize(None)` gives the same months, without the warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL
✅ Deploy Preview for taupe-gaufre-c4e660 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Validation: a full validationTwo fresh builds with no cache, each executing all 54 notebooks,
This pull request's first fresh build, 45012267153, failed on eight pages, all with HTTP 429 (Too Many Requests) while downloading data from QuantEcon/data-lectures. That day thirteen validation builds started at once, and GitHub rate-limited the downloads. The run above is the same build again, later. The two changed lectures. In each, the only difference is the changed line itself and the warning, which is gone. Every other output is identical, and so is every figure, byte for byte.
Build logs. The same warning lines on both sides, and no Sphinx warning on either. The rest of the HTML. 20 of 66 pages differ in all. Besides the two above, there are three kinds of difference, as between any two builds:
The warnings in the other pages' outputs are the same on both sides. |
There was a problem hiding this comment.
🔵 Needs a closer look
Human review is needed to confirm that the executable lecture changes preserve the intended pandas-version-specific warning behavior and instructional outputs across regenerated notebooks and external data.
No open issues 🎉
What changed in this PR
This PR updates two executable lecture examples to make pandas behavior explicit, removing deprecation and timezone-conversion warnings while preserving existing results.
Changes:
- Sets
sort=Truewhen concatenating time-indexed data ininflation_history. - Removes timezone information before converting timestamps to monthly periods in
fitting_distributions. - No actionable code issues identified.
| File | Description |
|---|---|
| lectures/inflation_history.md | Makes the concatenation sort behavior explicit for pandas compatibility. |
| lectures/fitting_distributions.md | Removes UTC timezone information before monthly period conversion. |
Review effort: Lite (adaptive)
What
Two cells print a pandas warning into their output. This states what pandas asks for, keeping the results the same:
df_list.append(pd.concat(sheet_list, axis=1))df_list.append(pd.concat(sheet_list, axis=1, sort=True))sort=False."sort=Truekeeps today's sorted result.monthly = times.dt.to_period('M').value_counts().sort_index()monthly = times.dt.tz_localize(None).dt.to_period('M').value_counts().sort_index()timesis in UTC, so dropping the zone first gives the same months.Both were found by the environment scan of 2026-11-19 and are in intro's own builds. This is part of reporting lecture fixes upstream to each lecture's source of truth (QuantEcon/project-monorepo#77).
Validation
Done on 2026-11-22, a full validation; the evidence is in the comment below. Fresh builds with no cache of this pull request and of main, every notebook executed, both green. In the two lectures both warnings are gone, and every other output and figure is identical.
This changes lecture content, so it needs a person's review.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WT8bMacV9Lmy1VLUc6XJoL